//1.引入
import {get,post} from "./axios"

// export  let rolelist = ()=>get("/rolelist")
// export  let getgoodsinfo = (data)=>get("/getgoodsinfo",data)

//1.添加菜单
export let menuadd = (data)=> post("/menuadd",data);

//2.获取菜单列表
export let menulist = ()=> get("/menulist?istree=true");


//3.删除菜单
export let menudelete = (data)=> post("/menudelete",data);

//4.获取菜单  -- 一条
export let menuinfo = (data)=> get("/menuinfo",data);

//5.修改菜单
export let menuedit = (data)=> post("/menuedit",data);

//---------------------角色------------------------
//6.添加角色
export let roleadd = (data)=> post("/roleadd",data);


//7.获取角色列表
export let rolelist = ()=> get("/rolelist");

//8.删除角色
export let roledelete = (data)=> post("/roledelete",data);

//9.获取一条角色
export let roleinfo = (data)=> get("/roleinfo",data);

//10.修改角色
export let roleedit = (data)=> post("/roleedit",data);

// --------------管理员管理---------------
//11.添加管理
export let useradd = (data)=> post("/useradd",data);

//12.获取管理员管理数据
export let userlist = (data)=> get("/userlist",data);

//13 删除管理员
export let userdelete = (data)=> post("/userdelete",data);

//14 获取数据总条数
export let usercount = ()=> get("/usercount");

//15 管理员获取（一条）
export let userinfo = (data)=> get("/userinfo",data);

//16 管理员修改
export let useredit = (data)=> post("/useredit",data);

//17 登录
export let userlogin = (data)=> post("/userlogin",data);


// ------------------------商品分类------------------------
//添加商品分类  true--上传文件
export let cateadd = (data)=> post("/cateadd",data,true);

// 商品分类列表 
export let catelist = ()=> get("/catelist?istree=true");

//获取商品分类-一条
export let cateinfo = (data)=> get("/cateinfo",data);

//修改商品分类 -- 图片上传
export let cateedit = (data)=> post("/cateedit",data,true);

export let catedelete = (data)=> post("/catedelete",data);
